package priv.mill.server.impl;
import java.util.List;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import priv.mill.dao.mapper.OrderMapper;
import priv.mill.entry.Order;
import priv.mill.server.OrderService;

@Component
public class OrderServiceImpl implements OrderService{

	private static final Logger logger = Logger
			.getLogger(OrderServiceImpl.class);

	@Autowired
	private OrderMapper orderMapper;
	
	@Override
	public Order getOrderById(Integer orderId) {
		return orderMapper.getOrderById(orderId);
	}

	@Override
	public Order getOrderByEntry(Order order) {
		return orderMapper.getOrderByEntry(order);
	}

	@Override
	public List<Order> getOrdersByPage(Order order) {
		return orderMapper.getOrdersByPage(order);
	}

	@Override
	public int updateOrder(Order order) {
		return orderMapper.updateOrder(order);
	}

	@Override
	public int insertOrder(Order order) {
		return orderMapper.insertOrder(order);
	}

	@Override
	public int deleteOrder(Integer orderId) {
		return orderMapper.deleteOrder(orderId);
	}
}
